In the packaging of integrated circuits, a plurality of top dies may be bonded on an interposer wafer, which comprises a plurality of interposers therein. After the bonding of the top dies, an underfill is dispensed into the gaps between the top dies and the interposer wafer. A curing process may then be performed to cure the underfill. A molding compound can be applied to mold the top dies therein. The resulting interposer wafer and the top dies thereon are then sawed apart into a plurality of packages, with the packages including exposed electrical connections such as solder balls. The packages are then bonded to printed circuit boards.